﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RaisingStudio.Data.Entities
{
    public partial class _MutipleKeysTable : RaisingStudio.Data.Expressions.TableExpression
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _MutipleKeysTable() : base("MutipleKeysTable")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Key1 = "Key1";
        public readonly RaisingStudio.Data.Expressions.ColumnExpression Key1 = _Key1;
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Key2 = "Key2";
        public readonly RaisingStudio.Data.Expressions.ColumnExpression Key2 = _Key2;
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Value1 = "Value1";
        public readonly RaisingStudio.Data.Expressions.ColumnExpression Value1 = _Value1;
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Value2 = "Value2";
        public readonly RaisingStudio.Data.Expressions.ColumnExpression Value2 = _Value2;

		#endregion
    }

    partial class MutipleKeysTable
    {
        #region Members
        public static readonly _MutipleKeysTable _ = new _MutipleKeysTable();

        public static RaisingStudio.Data.Expressions.ConditionExpression All
        {
            get
            {
                return new RaisingStudio.Data.Expressions.ConditionExpression();
            }
        }

        public static RaisingStudio.Data.Expressions.ColumnExpression[] Columns
        {
            get
            {
                return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {
                            _MutipleKeysTable._Key1,
                            _MutipleKeysTable._Key2,
                            _MutipleKeysTable._Value1,
                            _MutipleKeysTable._Value2,
                        };
            }
        }

        public static RaisingStudio.Data.Expressions.ColumnExpression[] Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            List<RaisingStudio.Data.Expressions.ColumnExpression> columnList = new List<RaisingStudio.Data.Expressions.ColumnExpression>(Columns);
            if ((columns != null) && (columns.Length > 0))
            {
                foreach (RaisingStudio.Data.Expressions.ColumnExpression column in columns)
                {
                    columnList.Remove(column);
                }
            }
            return columnList.ToArray();
        }
        #endregion
    }
}
